_pick() {
  local p="$1" f d; shift
  for f; do
    d="$SRC/$p/${f#$PKG/}"
    mkdir -p "$(dirname "$d")"
    mv "$f" "$d"
    rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
  done

}
  aylinux-meson elogind build \
	-D split-usr=true \
	-D smack=true \
	-D acl=true \
	-D pam=true \
	-D rootlibexecdir=/usr/lib
   ninja -C build
 
   DESTDIR="${PKG}" meson install -C build
  cd "$PKG"

  _pick libelogind usr/lib/pkgconfig 
  _pick libelogind usr/include
  _pick libelogind usr/lib/libelogind*.so*

  rm -rf "$PKG"/usr
   rm -rf "$PKG"/etc
    rm -rf "$PKG"/bin
     rm -rf "$PKG"/lib
  

 mv $SRC/libelogind/* "$PKG"
  